package com.greentreecs.fms.pojo.dto;

import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author 刀氏春秋
 * @date 2023/12/4
 */
@Data
@ApiModel("收入支出平衡结果")
public class IncOutcBalanceDTO {
    @ApiModelProperty("账号")
    @ExcelProperty("账号")
    private String accountNo;
    @ApiModelProperty("客人姓名")
    @ExcelProperty("姓名")
    private String guestName;
    @ApiModelProperty("当前账目")
    @ExcelProperty("余额")
    private Double balance;
    @ApiModelProperty("房号")
    @ExcelProperty("最后入住房号")
    private String roomNo;
    @ApiModelProperty("平账计算日期")
    @ExcelProperty("平账日期")
    private String accountDate;
    @ApiModelProperty("前台负责人")
    @ExcelProperty("前台负责人")
    private String operator;

    /**
     * 计算收支平衡结果
     *
     * @param bill 收入/支出账目
     */
    public void calBalance(Double bill) {
        this.balance += bill;
    }
}
